-- prop
-- created by zhuangsl
-- 直接使用整个prop的状态
-- condition中直接传入prop，需要key、value可以直接替换进描述

return {
    fetchProps = function(who, status, condition)
        local props = {};
        local prop = condition["prop"] or {};

        table.insert(props, prop);

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        local prop = condition["prop"] or {};
        local propId = prop[1];
        local value  = math.abs(prop[3]);
        if PropM.query(propId, "type") == PROP_TYPE_RATIO then
            -- 显示为百分比的
            value = math.modf(value / 10);
        end

        desc = string.gsub(desc, "{value}", value);

        return desc;
    end,
};
